Python Set - Not In Function

Function Name:


element not in(set_in)

Function Overview:

The not in() function checks whether an element is not present in the set.

Parameters:


set_in: The set in which the non-membership of an element to be checked for.

Return Value:


returns True if the element is not present in the python set.
returns False if the element is present in the python set.

Example:

>>> Palindromes = ["Kayak","Madam","Bob","Civic"]

>>> "Man" not in (Palindromes)

True

 


Copyright 2023 © pythontic.com